package com.tool;

import cn.com.tiza.tstar.common.entity.TStarData;
import cn.com.tiza.tstar.common.process.BaseHandle;
import cn.com.tiza.tstar.common.process.RPTuple;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by Administrator on 2018-4-18.
 */
public class KafkaStore extends BaseHandle {
    private static final Logger LOG = LoggerFactory
            .getLogger(BaseHandle.class);
public void writeKafka(TStarData tStarData){
    Map<String, String> map = new HashMap<>();
    map.put("broker.list","10.100.2.75:6667");
    this.setProcessorConf(map);
    try {
        for (int i=0;i<100;i++) {
            Thread.sleep(3000);
            storeInKafka(tStarData, "test_topic");
        }
    }catch (Exception ex){
        int a=0;
    }

}

    @Override
    public RPTuple handle(RPTuple rpTuple) throws Exception {
        return null;
    }

    @Override
    public void init() throws Exception {

    }
}
